package com.ruoyi.financial.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.financial.mapper.FBankerMapper;
import com.ruoyi.financial.domain.FBanker;
import com.ruoyi.financial.service.IFBankerService;

/**
 * 庄家Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-08
 */
@Service
public class FBankerServiceImpl implements IFBankerService 
{
    @Autowired
    private FBankerMapper fBankerMapper;

    /**
     * 查询庄家
     * 
     * @param id 庄家主键
     * @return 庄家
     */
    @Override
    public FBanker selectFBankerById(Long id)
    {
        return fBankerMapper.selectFBankerById(id);
    }

    /**
     * 查询庄家列表
     * 
     * @param fBanker 庄家
     * @return 庄家
     */
    @Override
    public List<FBanker> selectFBankerList(FBanker fBanker)
    {
        return fBankerMapper.selectFBankerList(fBanker);
    }

    /**
     * 新增庄家
     * 
     * @param fBanker 庄家
     * @return 结果
     */
    @Override
    public int insertFBanker(FBanker fBanker)
    {
        fBanker.setCreateTime(DateUtils.getNowDate());
        return fBankerMapper.insertFBanker(fBanker);
    }

    /**
     * 修改庄家
     * 
     * @param fBanker 庄家
     * @return 结果
     */
    @Override
    public int updateFBanker(FBanker fBanker)
    {
        fBanker.setUpdateTime(DateUtils.getNowDate());
        return fBankerMapper.updateFBanker(fBanker);
    }

    /**
     * 批量删除庄家
     * 
     * @param ids 需要删除的庄家主键
     * @return 结果
     */
    @Override
    public int deleteFBankerByIds(Long[] ids)
    {
        return fBankerMapper.deleteFBankerByIds(ids);
    }

    /**
     * 删除庄家信息
     * 
     * @param id 庄家主键
     * @return 结果
     */
    @Override
    public int deleteFBankerById(Long id)
    {
        return fBankerMapper.deleteFBankerById(id);
    }
}
